const users = require('./users')
const mongodb = require('./index')
const path = require('path')
const uuid = require('uuid')
const node_xlsx = require('node-xlsx')

const way = path.join(__dirname,'..','files','my_users.xlsx')
const data = node_xlsx.parse(way)

data[0].data.forEach(val=>{
    mongodb.add(users,{
        userid:'user-' + uuid.v1(),
        username:val[0],
        password:val[1],
        regtime:Date.now(),
        isLogin:false,
        token:''
    },()=>{})
})